@import 'ng-devui/styles-var/devui-var.scss';

:host {
  display: block;
  height: 100%;
  background-color: #f6fafe;
}
:host ::ng-deep .devui-toast{
  transform: translateX(-50%);
}
.da-login {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  background-image: url('../../../../assets/img/background/login-bg.png'); // 设置背景图片
  background-size: cover; // 让背景图片填满 div
  background-position: center; // 让背景图片居中显示
  background-repeat: no-repeat; // 不重复显示背景图片

  .da-language-wrapper {
    position: absolute;
    top: 22px;
    right: 28px;
    outline: none;
    cursor: pointer;
    padding: 0 12px;

    svg path {
      fill: $devui-text;
    }
  }

  .da-login-form {
    width: 400px;
    height: auto;
    font-size: $devui-font-size-card-title;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.93);
    border-radius: $devui-border-radius-card;
    box-shadow: $devui-shadow-length-base $devui-light-shadow;
    position: absolute;
    top: 20%;

    .da-login-logo-wrapper {
      margin-bottom: 40px;
      display: flex;
      flex-direction: column;

      .da-login-logo {
        display: flex;
        align-items: center;
        justify-content: center;

        .da-logo-devui {
          img {
            width: 40px;
            height: 40px;
          }
        }

        .da-text {
          color: $devui-dark-text;
          font-size: 26px;
          margin-left: 16px;
          font-weight: 600;
        }
      }

      .da-coperation {
        text-align: center;
        font-size: $devui-font-size-page-title;
        font-weight: 700;
        margin-top: 8px;
        margin-bottom: -8px;
      }
    }

    d-tabs {
      display: flex;
      justify-content: center;
      margin-bottom: 32px;
    }

    .da-tabs-title {
      font-size: $devui-font-size-card-title;
    }

    .da-login-ways {
      input {
        font-size: $devui-font-size-card-title;
        height: 32px;
        background-color: transparent;
        transition: all 0.2s ease-in-out;

        &.devui-error:hover {
          border-color: $devui-danger-line;
        }

        &.devui-error:focus {
          box-shadow: none;
        }

        &:hover {
          border-color: $devui-brand;
        }

        &:focus {
          box-shadow: 0 0 2px 2px $devui-float-block-shadow;
        }
      }
    }

    .da-login-options {
      display: flex;
      justify-content: space-between;
      margin-bottom: 32px;

      .auto-login-text {
        margin-left: 8px;
      }
    }

    .da-submit-button {
      width: 100%;
      height: 40px;
      color: $devui-light-text;
      background-color: $devui-brand;
      border-radius: $devui-border-radius-feedback;
      padding-top: 4px;
      padding-bottom: 4px;

      transition: background-color 0.15s ease-in-out;

      &:hover {
        background-color: $devui-brand-hover;
      }
    }

    .da-other {
      margin-top: 20px;
      text-align: left;

      i {
        margin-left: 8px;
        vertical-align: middle;

        svg {
          fill: $devui-text-weak;
          transition: fill 0.2s ease-in-out;

          &:hover {
            fill: $devui-text;
          }
        }

        &:hover {
          cursor: pointer;
        }
      }

      a {
        float: right;
      }
    }
  }

  da-footer {
    position: fixed;
    bottom: 0;
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 24px 0;
  }
}

.da-login .da-login-form .da-login-ways input {
  font-size: var(--devui-font-size-card-title, 14px);
  height: 32px;
  background-color: rgba(255, 255, 255, 0.6) !important;
}

.form-card-title {
  font-size: $devui-font-size-card-title;
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
  color: #252b3a;
  text-shadow: 0 0 .4px $devui-brand-active;

  .da-register-title {
    border-bottom: 3px solid #252b3a;
  }
}
:host ::ng-deep .devui-toast{
  transform: translateX(-50%);
}
:host ::ng-deep .custom-class {
  .devui-toast-message-success {
    .devui-toast-item {
      width: 26em;
      color: #252b3a;
      background-color: $devui-success-bg;

      .devui-toast-icon-close {
        top: 10px;
        right: 13px;

        .devui-toast-close-icon {
          fill: #252b3a;
        }
      }

      .devui-toast-image {
        top: 15px;
      }

      .devui-toast-message {
        line-height: 23px;

        .devui-toast-title {
          font-size: 16px;
        }

        p {
          font-size: 14px;
        }
      }
    }
  }

  .devui-toast-item {
    color: #f3f3f3;
    background-color: $devui-red-50;
    width: 26em;

    .devui-toast-icon-close {
      top: 10px;
      right: 13px;

      .devui-toast-close-icon {
        fill: #252b3a;
      }
    }

    .devui-toast-image {
      top: 15px;
    }

    .devui-toast-message {
      line-height: 23px;

      .devui-toast-title {
        font-size: 16px;
      }

      p {
        white-space: nowrap;
        font-size: 14px;
      }
    }
  }

  .devui-toast-message-warn {
    .devui-toast-item {
      color: #252b3a;
      background-color: $devui-warning-bg;
      width: 26em;

      .devui-toast-icon-close {
        top: 10px;
        right: 13px;

        .devui-toast-close-icon {
          fill: #252b3a;
        }
      }

      .devui-toast-image {
        top: 15px;
      }

      .devui-toast-message {
        line-height: 23px;

        .devui-toast-title {
          font-size: 16px;
        }

        p {
          white-space: nowrap;
          font-size: 14px;
        }
      }
    }
  }
}

:host ::ng-deep .devui-form-sm.devui-form-horizontal .devui-form-label {
  flex: 0 0 60px !important;
}
